using System;
using System.Data;
using System.Text;
using System.Collections.Generic;

#region user code using
#endregion user code using

namespace Adoor.Ouvrages
{
	#region user code namespace
	#endregion user code namespace
	
	
	public abstract class Livre : Adoor.Ouvrages.Ouvrage
	#region user code implements
	#endregion user code implements
	{
	
		public const int NomLength = 30;
		
		public virtual System.String Nom
		{
			get
			{
				System.String  value = this.m_Nom;
				#region user code get public System.String Nom
				#endregion user code get public System.String Nom
				return value; 
			}
			set
			{ 
				#region user code set public System.String Nom
				#endregion user code set public System.String Nom				
				this.m_Nom = value;
				OnNomChanged();
			}
		}
		
		public event EventHandler NomChanged;
		
		protected virtual void OnNomChanged()
		{				
			if(NomChanged != null)
				NomChanged(this, System.EventArgs.Empty);			
					
			#region user code OnNomChanged
			#endregion user code OnNomChanged				
		}

		public const int ISBNLength = 13;
		
		public virtual System.String ISBN
		{
			get
			{
				System.String  value = this.m_ISBN;
				#region user code get public System.String ISBN
				#endregion user code get public System.String ISBN
				return value; 
			}
			set
			{ 
				#region user code set public System.String ISBN
				#endregion user code set public System.String ISBN				
				this.m_ISBN = value;
				OnISBNChanged();
			}
		}
		
		public event EventHandler ISBNChanged;
		
		protected virtual void OnISBNChanged()
		{				
			if(ISBNChanged != null)
				ISBNChanged(this, System.EventArgs.Empty);			
					
			#region user code OnISBNChanged
			#endregion user code OnISBNChanged				
		}

		public virtual Adoor.Ouvrages.Categorie Categorie
		{
			get
			{
				Adoor.Ouvrages.Categorie  value = this.m_Categorie;
				#region user code get public Adoor.Ouvrages.Categorie Categorie
				#endregion user code get public Adoor.Ouvrages.Categorie Categorie
				return value; 
			}
			set
			{ 
				#region user code set public Adoor.Ouvrages.Categorie Categorie
				#endregion user code set public Adoor.Ouvrages.Categorie Categorie
				this.m_Categorie = value; 
				OnCategorieChanged();
			}
		}
		
		public event EventHandler CategorieChanged;
		
		protected virtual void OnCategorieChanged()
		{			
			if(CategorieChanged != null)
				CategorieChanged(this, System.EventArgs.Empty);
				
			#region user code OnCategorieChanged
			#endregion user code OnCategorieChanged
		}

		public virtual IList<Adoor.Ouvrages.Auteur > Auteur
		{
			get { return this.m_Auteur; }
		}

		
		public override System.String ModifiePar
		{
			get
			{
				System.String  value = base.ModifiePar;
				#region user code get public System.String ModifiePar
				#endregion user code get public System.String ModifiePar
				return value; 
			}
		}
		
		public override System.DateTime ModifieLe
		{
			get
			{
				System.DateTime  value = base.ModifieLe;
				#region user code get public System.String ModifieLe
				#endregion user code get public System.String ModifieLe
				return value; 
			}
		}
		
		public override System.String TableName
		{
			get
			{
				System.String  value = base.TableName;
				#region user code get public System.String TableName
				#endregion user code get public System.String TableName
				return value; 
			}
		}
		
		/// <summary>
		/// Called when user is creating a new entity.
		/// </summary>
		protected override void OnCreate(object[] args)
		{
			base.OnCreate(args);
			Nom = "";		
	ISBN = "";		
	
			#region user code OnCreate
			#endregion user code OnCreate
		}
				
		/// <summary>
		/// Called when user is retreiving an entity from storage
		/// </summary>
		protected override void OnMaterialize()
		{
			base.OnMaterialize();
			#region user code OnMaterialize
			#endregion user code OnMaterialize
		}
		
		protected abstract System.String m_Nom { get; set; }

		protected abstract System.String m_ISBN { get; set; }

		protected abstract Adoor.Ouvrages.Categorie m_Categorie { get; set; }

		protected abstract IList<Adoor.Ouvrages.Auteur > m_Auteur { get; }


		#region user code class
		#endregion user code class
	}
}
